<?php 
include '../inc/reuse/dbconfig.php';
$sql = "SELECT * FROM contacts WHERE contacts_id=".$_GET['contacts_id'] ;
$rsd = mysql_query($sql);
$id= "";
$sender = "";
$phone = "";
$to = "";
$company ="";
$subject = "";
$description ="";
$time = "";
while($row = mysql_fetch_array($rsd)){
	$id = $row['contacts_id'];
	$sender = $row['contacts_from_sender'];
	$phone = $row['contacts_from_sender_phone'];
	$to = $row['contacts_from_sender_email'];
	$company = $row['contacts_from_company'];
	$subject = $row['contacts_title'];
	$description = nl2br(htmlspecialchars($row['contacts_description']));	
	$time = $row['contacts_date_time'];
}
$date = substr($time, 0,4)."/".substr($time, 4,2)."/".substr($time, 6,2);
echo "<div class=\"contact_view_border\">";
echo "<div class=\"font_style\">";
echo "ชื่อผู้ส่ง : ".$sender."<br/>เบอร์โทรศัพท์ : ".$phone."<br/>email ติดต่อ : ".$to."<br/>บริษัทที่ติดต่อ : ".$company."<br/>หัวข้อเรื่อง : ".$subject."<br/>รายละเอียด : <br/>".$description."<br/>วันที่ติดต่อ : ".$date."<br/>";
echo "</div>";
echo "</div>";
?>